***************
* This script produces tables and figures based on the estimates of the part-time penalty by isco 2-digit occupation
* Author: Daniel Kopp
***************


	clear
	clear matrix
	clear mata
	set more off	
	set maxvar 8000

	use "Misc_files\share_seeking_fulltime_gender_isco2.dta"

	cap drop y x
	cap set obs  10
	cap gen y = 1
	cap gen x = 1	
	reg y x

	nlcom (base0: _b[x]) (base1: _b[x]), post
	estimates store base0
		
	
	******************************************************************	
	******************************************************************
	* Part-time penalty (for men and women together) by isco 2
	******************************************************************
	******************************************************************
	
	cap gen penalty_parttime_tog_int = . 
	cap gen t_penalty_parttime_tog_int  =. 
	cap gen se_penalty_parttime_tog_int  =.
	cap gen lo_penalty_parttime_tog_int  = .
	cap gen hi_penalty_parttime_tog_int = .				

	estimates use "$save_path\only_parttime_by_isco2_int"
	estimates store part2_i2_interact	
	
	* One parttime coefficient for men and women together
	estimates restore part2_i2_interact
		local mean_sample = e(mean_sample)
		local mean_disp = e(mean_disp)		
		local N = e(N)
		matrix b = e(b) 
		matrix b = b[1,1..41]
		matrix V = e(V)
		matrix V = V[1..41,1..41]
		local obs : disp %9.0f `N'
		quietly ereturn post b V, dep(contact_button_clicked) obs(`obs') 	
			estadd local mean_sample   " `mean_sample' "
			estadd local mean_disp   " `mean_disp' "			
			estadd local obs  " `obs' "															
	eststo part2_i2_interact_sm	
			
	* Gen number of observations and mean contact rate per isco-2 occupation
	cap gen no_obs_isco = . 
	cap gen mean_contact_isco = . 
	foreach i in 11 12 13 14 21 22 23 24 25 26 31 32 33 34 35 41 42 43 44 51 52 53 54 61 62 71 72 73 74 75 81 82 83  91 92 93 96 99  {		
		estimates use "$save_path\summary_isco`i'"
		matrix list e(mean)
		matrix c = e(mean)
		local obs_`i' = e(N)
		global mean_`i' =  c[1,1]
		disp "`obs_`i''"
		disp "${mean_`i'}"
		replace no_obs_isco = `obs_`i'' if s_isco_08_2==`i' 
		replace mean_contact_isco = ${mean_`i'} if s_isco_08_2==`i' 
	}	
		
	* Without  95 since there a coefficient for parttime could not be estimated (only 34 obs)	
	foreach i in 11 12 13 14 21 22 23 24 25 26 31 32 33 34 35 41 42 43 44 51 52 53 54 61 62 71 72 73 74 75 81 82 83  91 92 93 96 99  {		
	
	* Scale coefficients
	estimates restore part2_i2_interact_sm		
			local scale_`i': disp %9.6g  100/${mean_`i'}
			local N = e(N)
			matrix b = e(b) * 100/${mean_`i'}
			matrix V = e(V) * (100/${mean_`i'}) ^2
			local obs : disp %8.0f `N'
			quietly ereturn post b V, dep(contact_button_clicked) obs(`obs') 								
	eststo 	part2_i2_interact_sc	
	
	estimates restore part2_i2_interact_sc	
		cap	local 	penalty_parttime_tog_int 		= _b[isco2_`i'Xparttime] 
		cap	replace penalty_parttime_tog_int 	 	= `penalty_parttime_tog_int' 			if s_isco_08_2==`i'		
		cap local 	t_penalty_parttime_tog_int 	 	= abs(_b[isco2_`i'Xparttime] / _se[isco2_`i'Xparttime] )
		cap replace t_penalty_parttime_tog_int 	 	= `t_penalty_parttime_tog_int' 			if s_isco_08_2==`i'		
		cap local 	se_penalty_parttime_tog_int 	=  _se[isco2_`i'Xparttime] 
		cap replace se_penalty_parttime_tog_int 	= `se_penalty_parttime_tog_int' 		if s_isco_08_2==`i'		
		cap local 	lo_penalty_parttime_tog_int 	=  _b[isco2_`i'Xparttime] - 1.96 * _se[isco2_`i'Xparttime] 
		cap replace lo_penalty_parttime_tog_int 	= `lo_penalty_parttime_tog_int' 		if s_isco_08_2==`i'		
		cap local 	hi_penalty_parttime_tog_int 	=  _b[isco2_`i'Xparttime] + 1.96 * _se[isco2_`i'Xparttime] 
		cap replace hi_penalty_parttime_tog_int 	= `hi_penalty_parttime_tog_int' 		if s_isco_08_2==`i'			
	}

	* With different markers for different skill levels:
	
	* Gen isco 1-digit
	recode s_isco_08_2 (10=99) (20=99) (30=99) (50=99) (70=99) (90=99)	
	gen s_isco_08_1 = .
	replace s_isco_08_1 = 1 if inrange(s_isco_08_2,11,14)
	replace s_isco_08_1 = 2 if inrange(s_isco_08_2,21,26)
	replace s_isco_08_1 = 3 if inrange(s_isco_08_2,31,35)
	replace s_isco_08_1 = 4 if inrange(s_isco_08_2,41,44)
	replace s_isco_08_1 = 5 if inrange(s_isco_08_2,51,54)
	replace s_isco_08_1 = 6 if inrange(s_isco_08_2,61,64)
	replace s_isco_08_1 = 7 if inrange(s_isco_08_2,71,75)
	replace s_isco_08_1 = 8 if inrange(s_isco_08_2,81,83)
	replace s_isco_08_1 = 9 if inrange(s_isco_08_2,91,96)
	replace s_isco_08_1 = 0 if inrange(s_isco_08_2,01,03)
	cap label drop isco08_1_lab
	run "Help_files\label_isco08_1.do"
	label values s_isco_08_1 isco08_1_lab
	
	recode s_isco_08_1 (.=0) 						// we recode missing values as zero (no information)

	* ISCO skill levels: 
	* Isco 1 (Managers): 								skill level 3 + 4
	* Isco 2 (Professionals): 							skill level 4
	* Isco 3 (Technicians and associate professionals): skill level 3
	* Isco 4-8 (Medium skilled workers):				skill level 2
	* Isco 9 (Elementary occupations):					skill level 1
	* Isco 0 (Armed fordes):							skill level 1 + 2 + 4
	
	gen 	skill_isco = 5 if s_isco_08_1==1
	replace skill_isco = 4 if s_isco_08_1==2
	replace skill_isco = 3 if s_isco_08_1==3
	replace skill_isco = 2 if inrange(s_isco_08_1,4,8)
	replace skill_isco = 1 if s_isco_08_1==9
	replace skill_isco = 0 if s_isco_08_1==0
	
	label define skill_isco 0 "No information" 1 "Elementary occupations" 2 "Medium skilled workers" 3 "Technicians and assoc. prof." 4 "Professionals" 5 "Managers"
	label values skill_isco skill_isco
		
	separate penalty_parttime_tog_int , by(skill_isco) gen(penalty_parttime_tog_skill)
	levelsof skill_isco, local(levels)
	foreach i of local levels {
	local lab_`i' : label isco08_1_lab `i'	
	label var  penalty_parttime_tog_skill`i' " `lab_`i'' " 
	}
		
		
	preserve
	* Drop occupations with no observations and where no coefficient could be estimated
	* Drop occupations with less than 100 recruiters since those estimates are very imprecise
	count									// 39
	drop if no_obs_isco==.
	count									// 38

	sort penalty_parttime_tog_int
	cap gen sortno = _n 
	labmask sortno, values(s_isco_08_2) decode
	local msize "medsmall"		
	* Cut CI's at -80 and +5
	local low_ci "lo_penalty_parttime_tog_int"
	local high_ci "hi_penalty_parttime_tog_int"
	replace lo_penalty_parttime_tog_int = -80 if lo_penalty_parttime_tog_int<-80
	replace hi_penalty_parttime_tog_int = 5 if hi_penalty_parttime_tog_int>5
	local red "189 30 36"
	local orange "233 118 0"
	local yellow "246 199 0"
	local green "0 114 86"
	local purple "150 79 142"
	local blue "0 103 167"
	twoway  (rspike `low_ci' `high_ci' sortno, lcolor(gs12) horizontal) ///
			(scatter sortno penalty_parttime_tog_skill1  , msymbol(Oh)   msize(`msize') mc("black") ) ///
			(scatter sortno penalty_parttime_tog_skill2  , msymbol(D)   msize(`msize') mc("black" ) ) ///
			(scatter sortno penalty_parttime_tog_skill3  , msymbol(O)   msize(`msize')  mc("gs10" ))  ///
			(scatter sortno penalty_parttime_tog_skill4  , msymbol(T)   msize(`msize') mc("gs10" ) ) ///			
			(scatter sortno penalty_parttime_tog_skill5  , msymbol(Sh)   msize(`msize') mc("black" ) ) , ///
			legend(order( 2 3 4 5 6) label(2 "Elementary") label(3 "Medium skilled") label(4 "Technicians/assoc. prof.") label(5 "Professionals") label(6 "Managers")  size(small))  ///
			ylabel(1(1)37 , valuelabel labsize(vsmall) nogrid  angle(horizontal))	 ///
			xtitle("Part-time penalty by occupation (in %)", size(small)) ///
			xlabel(, labsize(small) )  ///	
			xline(0, lcolor(black) lpattern(dash)) ytitle(" ") ///
			graphregion(color(white)) bgcolor(white)  	
	graph export "$results_part_time/figure_d5.eps", as(eps) replace
	* Produce table to have numerical estimates		
	drop y x _est_base0 penalty_parttime_tog_skill0 penalty_parttime_tog_skill1 penalty_parttime_tog_skill2 penalty_parttime_tog_skill3 penalty_parttime_tog_skill4 penalty_parttime_tog_skill5 sortno
	export delimited using "$results_part_time/figure_d5_table.csv", replace	
	restore	
		
	*********************************************************
	* Is there a relationship between the part-time penalty in a given occupation and the women share in the result list?
	*********************************************************

	merge 1:1 s_isco_08_2 using "Misc_files\isco_share_female.dta", keepusing(female_share_isco_ws)
	drop if _merge==2
	drop _merge
	
	cap gen isco_2 = s_isco_08_2
	merge m:1 isco_2 using "Misc_files\lse_isco_women.dta"
	drop if _merge==2
	drop _merge

	rename woman  share_female_lse 
	label var share_female_lse "Female share in occupation"
	
	replace female_share_isco_ws = female_share_isco_ws*100
	replace share_female_lse = share_female_lse*100
	
	* By male share in result list
	gen male_share_isco_ws = 100-female_share_isco_ws
	
	preserve
	count									// 39
	drop if no_obs_isco==.
	count									// 38
	* Regression line:		
	local weight "[w = no_obs_isco]"	
	regress penalty_parttime_tog_int 		male_share_isco_ws `weight'
		local eq      "Part-time penalty = `: di  %5.1f _b[_cons]'"
		local eq      `"`eq' `=cond(_b[male_share_isco_ws]>0, "+", "-")'"'
		local eq      `"`eq' `: di %5.3f abs(_b[male_share_isco_ws])' "'
		local eq      `"`eq'(`: di %5.3f _se[male_share_isco_ws]') * Male share"'
		local eq      `"`eq' + {&epsilon}"'   
	disp "`eq'"
		
	cap predict double xb_line_parttime_isco	, xb 
	
	cap predict double se_line_parttime_isco , stdp
	gen ci_upper_parttime_isco = xb_line_parttime_isco+se_line_parttime_isco*1.96
	gen ci_lower_parttime_isco = xb_line_parttime_isco-se_line_parttime_isco*1.96

	local parttime 		"penalty_parttime_tog_int" 
	local t_parttime 	"t_penalty_parttime_tog_int"
	local msize "small"
	local weight "[w = no_obs_isco]"	
		twoway  (scatter `parttime' 					male_share_isco_ws  `weight' 	,  mcolor(black) mlcolor(white) mlwidth(thin) msize(`msize')) ///
				(line 	ci_upper_parttime_isco 			male_share_isco_ws  			,  msymbol(none) lwidth(medthin) lcolor(black) lpattern(dash)  sort ) ///
				(line 	ci_lower_parttime_isco 			male_share_isco_ws  			,  msymbol(none) lwidth(medthin) lcolor(black) lpattern(dash)  sort ) ///
				(line 	xb_line_parttime_isco 			male_share_isco_ws  			,  msymbol(none) lwidth(medthin) lcolor(black) ) ,    ///			
				graphregion(color(white))  legend(off) ///
				xtitle(Male share in result lists) ///
				ytitle(Part-time penalty) ///
				title(" `eq'"  , size(small) justification(left)) 				
	graph export "$results_part_time/figure_d6_a.eps", as(eps) replace		
	* Produce table to have numerical estimates		
	drop s_isco_08_1 y x _est_base0 penalty_parttime_tog_skill0 penalty_parttime_tog_skill1 penalty_parttime_tog_skill2 penalty_parttime_tog_skill3 penalty_parttime_tog_skill4 penalty_parttime_tog_skill5 
	export delimited using "$results_part_time/figure_d6_a_table.csv", replace	
	restore
		
		
	* Now with shrunken coefficients
	* For the empirical shrinkage procedure, see "Koedel et al. 2015: Value-Added Modeling: A Review" 
	foreach coef in penalty_parttime_tog_int  {

	preserve
	count									// 39
	drop if no_obs_isco==.
	count									// 38
	
	cap drop lambda_j
	gen   lambda_j = se_`coef'^2

	quietly sum lambda_j
	local mean_lambda_j = r(mean)
	
	quietly sum `coef'
	local mean_beta = r(mean)		// .817
	disp "The mean of the unshrunken coefficients is `mean_beta'"
	local sigma_sq = r(Var)								// this is the unadjustes sigma
															 
	cap drop alpha
	gen alpha = `sigma_sq' / (`sigma_sq' + lambda_j)
	
	* Gen EB estimate:
	cap drop `coef'_adj
	gen `coef'_adj = alpha*`coef'+(1-alpha)*`mean_beta'

	sum `coef' `coef'_adj,d

	* Gen se of EB estimate:
	cap drop se_`coef'_adj
	gen se_`coef'_adj = (alpha*lambda_j)^0.5   // See the formula in Herrmann et al. 2016, page 3 

	sum  se_`coef' se_`coef'_adj
	
	cap drop t_`coef'_adj 	
	gen t_`coef'_adj 	 	= abs(`coef'_adj / se_`coef'_adj )

	cap drop hi_`coef'_adj lo_`coef'_adj
	gen hi_`coef'_adj  = `coef'_adj  + 1.96 * se_`coef'_adj
	gen lo_`coef'_adj  = `coef'_adj  - 1.96 * se_`coef'_adj	
	
		
	* Regression line raw coefficients:		
	local weight ""	
	regress `coef'_adj 		male_share_isco_ws `weight'
		local eq        "Part-time penalty = `: di  %5.3g _b[_cons]'"
		local eq        `"`eq' `=cond(_b[male_share_isco_ws]>0, "+", "-")'"'
		local eq        `"`eq' `: di %5.3f abs(_b[male_share_isco_ws])' "'
		local eq        `"`eq'(`: di %5.3f _se[male_share_isco_ws]') * Male share"'
		local eq        `"`eq' + {&epsilon}"'   
	disp "`eq'"
		
	cap predict double xb_line_parttime_isco	, xb 
	
	cap predict double se_line_parttime_isco , stdp
	gen ci_upper_parttime_isco = xb_line_parttime_isco+se_line_parttime_isco*1.96
	gen ci_lower_parttime_isco = xb_line_parttime_isco-se_line_parttime_isco*1.96


	local parttime 		"`coef'_adj" 
	local t_parttime 	"t_`coef'_adj"
	local msize "medium"
	local weight ""	
		twoway  (scatter `parttime' 					male_share_isco_ws  `weight' 	,  mcolor(black) mlcolor(white) mlwidth(thin) msize(`msize')) ///
				(line 	ci_upper_parttime_isco 			male_share_isco_ws  			,  msymbol(none) lwidth(medthin) lcolor(black) lpattern(dash)  sort ) ///
				(line 	ci_lower_parttime_isco 			male_share_isco_ws  			,  msymbol(none) lwidth(medthin) lcolor(black) lpattern(dash)  sort ) ///
				(line 	xb_line_parttime_isco 			male_share_isco_ws  			,  msymbol(none) lwidth(medthin) lcolor(black) ) ,    ///			
				graphregion(color(white))  legend(off) ///
				xtitle(Male share in result lists) ///
				ytitle(Part-time penalty) ///
				title("  `eq'"  , size(small) justification(left)) 
	graph export "$results_part_time/figure_d6_b.eps", as(eps) replace		
	drop s_isco_08_1 y x _est_base0 penalty_parttime_tog_skill0 penalty_parttime_tog_skill1 penalty_parttime_tog_skill2 penalty_parttime_tog_skill3 penalty_parttime_tog_skill4 penalty_parttime_tog_skill5 	
	export delimited using "$results_part_time/figure_d6_b_table.csv", replace	
	restore
	}		

		
	*********************************************************			
	* Is there a relationshiop between the part-time penalty in a given occupation and the share of jobs where workers have totally flexible working hours
	*********************************************************
		
	merge 1:1   s_isco_08_2  using "Misc_files\working_time_v_flex_isco2.dta"
	drop if _merge==2
	drop _merge
	drop if s_isco_08_2==.
		
	* Men and women in one graph	
		
	local regressor "v_flex_working_time"
	local obs_regressor "obs_v_flex_working_time"
	
	preserve
	count
	drop if no_obs_isco==.
	drop if s_isco_08_2==99 	// no information
	drop if `obs_regressor'<100 // we drop those occupations where we have less than 100 observations 
	drop if `obs_regressor'==.	
	count
	
	local weight "[w = no_obs_isco]"	
	regress penalty_parttime_tog_int 	`regressor'  `weight' 
	eststo est_`regressor'
	restore					
	

	*********************************************************			
	* Is there a relationship between the part-time penalty in a given occupation and the share of workers who can easily take time off
	*********************************************************
		
	cap drop take_time_off_hour take_time_off_day obs_take_time_off_hour obs_take_time_off_day	
	merge 1:1   s_isco_08_2  using "Misc_files\take_time_off_by_isco2.dta"
	drop if _merge==2
	drop _merge
	drop if s_isco_08_2==.
	
	* take_time_off_hour: "Easy to take an hour or two off at short notice"
	local regressor "take_time_off_hour"
	local obs_regressor "obs_take_time_off_hour"

	preserve
	count
	drop if no_obs_isco==.
	drop if s_isco_08_2==99 	// no information
	drop if `obs_regressor'<50 // we drop those occupations where we have less than 100 observations (with 100 we lose too many obs)
	drop if `obs_regressor'==.	
	count
	
	local weight "[w = no_obs_isco]"	
	regress penalty_parttime_tog_int 	`regressor'  `weight' 
	eststo est_`regressor'
	restore					
	
	

	*********************************************************			
	* Is there a relationshiop between the part-time penalty in a given occupation and overtime work?
	*********************************************************
	
	* Share of workers working overtime
	merge 1:1   s_isco_08_2  using "Misc_files\overtime_extrawork_by_isco2.dta"
	drop if _merge==2
	drop _merge
	drop if s_isco_08_2==.
	
	local regressor "overtime_isco2"
	local obs_regressor "obs_overtime_isco2"
	
	preserve
	count
	drop if no_obs_isco==.
	drop if s_isco_08_2==99 	// no information
	drop if `obs_regressor'<100 // we drop those occupations where we have less than 100 observations 
	drop if `obs_regressor'==.	
	count
	
	local weight "[w = no_obs_isco]"	
	regress penalty_parttime_tog_int 	`regressor'  `weight' 
	eststo est_`regressor'
	restore					
	
	* Share of overtime pay in total wage bill per occupation based on LSE
	merge 1:1   s_isco_08_2  using "Misc_files\lse_isco_overtime.dta"
	drop if _merge==2
	drop _merge
	drop if s_isco_08_2==.
	
	local regressor "share_overtime_pay"
	local obs_regressor "obs_share_overtime_pay"
	
	preserve
	replace share_overtime_pay = share_overtime_pay*100	
	count
	drop if no_obs_isco==.
	drop if s_isco_08_2==99 	// no information
	drop if `obs_regressor'<100 // we drop those occupations where we have less than 100 observations 
	drop if `obs_regressor'==.	
	count
	
	local weight "[w = no_obs_isco]"	
	regress penalty_parttime_tog_int 	`regressor'  `weight' 
	eststo est_`regressor'
	restore			
	
	
	*********************************************************			
	* Is there a relationshiop between the part-time penalty in a given occupation and the share of shift work?
	*********************************************************
	
	merge 1:1   s_isco_08_2  using "Misc_files\schichtarbeit_s_by_isco2.dta"
	drop if _merge==2
	drop _merge
	drop if s_isco_08_2==.
							
	local regressor "schicht_isco2"
	local obs_regressor "obs_schicht_isco2"	
	
	preserve
	count
	drop if no_obs_isco==.
	drop if s_isco_08_2==99 	// no information
	drop if `obs_regressor'<100 // we drop those occupations where we have less than 100 observations 
	drop if `obs_regressor'==.	
	count
	
	local weight "[w = no_obs_isco]"	
	regress penalty_parttime_tog_int 	`regressor'  `weight' 
	eststo est_`regressor'
	restore			
	
	
	*********************************************************			
	* Is there a relationshiop between the part-time penalty in a given occupation and the share of workers who report time pressure?
	*********************************************************

	* Based on Job-Room data
	merge 1:1   s_isco_08_2  using "Misc_files\time_pressure_by_isco2.dta"
	drop if _merge==2
	drop _merge
	drop if s_isco_08_2==.													
	
	local regressor "time_pressure"
	local obs_regressor "obs_time_pressure"
	
	preserve
	count
	drop if no_obs_isco==.
	drop if s_isco_08_2==99 	// no information
	drop if `obs_regressor'<100 // we drop those occupations where we have less than 100 observations 
	drop if `obs_regressor'==.	
	count
	
	local weight "[w = no_obs_isco]"	
	regress penalty_parttime_tog_int 	`regressor'  `weight' 
	eststo est_`regressor'
	restore				
	
	
	*********************************************************			
	* Is there a relationshiop between the part-time penalty in a given occupation and the share of workers who work autonomous?
	*********************************************************

	merge 1:1   s_isco_08_2  using "Misc_files\work_autonomy_by_isco2.dta"
	drop if _merge==2
	drop _merge
	drop if s_isco_08_2==.
			
	***
	* Worker can influence the order of tasks		
	***
	
	local regressor "autonom_order_task"
	local obs_regressor "obs_autonom_order_task"
	
	preserve
	count
	drop if no_obs_isco==.
	drop if s_isco_08_2==99 	// no information
	drop if `obs_regressor'<100 // we drop those occupations where we have less than 100 observations 
	drop if `obs_regressor'==.	
	count
	
	local weight "[w = no_obs_isco]"	
	regress penalty_parttime_tog_int 	`regressor'  `weight' 
	eststo est_`regressor'
	restore					
			
	***
	* Worker can influence the content of tasks		
	***
		
	local regressor "autonom_content_task"
	local obs_regressor "obs_autonom_content_task"
	
	preserve
	count
	drop if no_obs_isco==.
	drop if s_isco_08_2==99 	// no information
	drop if `obs_regressor'<100 // we drop those occupations where we have less than 100 observations 
	drop if `obs_regressor'==.	
	count
	
	local weight "[w = no_obs_isco]"	
	regress penalty_parttime_tog_int 	`regressor'  `weight' 
	eststo est_`regressor'
	restore						
	

	
	******************************
	* Now generate table
	******************************
	run "Help_files\progr_appendmodels.do"


	* Note: 999999 means "+"   888888 means "-"
	nlcom (v_flex_working_time: 999999), post
	estimates store sign_v_flex_working_time

	* Note: 999999 means "+"   888888 means "-"
	nlcom (take_time_off_hour: 999999), post
	estimates store sign_take_time_off_hour

	* Note: 999999 means "+"   888888 means "-"
	nlcom (overtime_isco2: 888888), post
	estimates store sign_overtime_isco2

	* Note: 999999 means "+"   888888 means "-"
	nlcom (share_overtime_pay: 888888), post
	estimates store sign_share_overtime_pay

	* Note: 999999 means "+"   888888 means "-"
	nlcom (schicht_isco2: 888888), post
	estimates store sign_schicht_isco2

	* Note: 999999 means "+"   888888 means "-"
	nlcom (time_pressure: 888888), post
	estimates store sign_time_pressure

	* Note: 999999 means "+"   888888 means "-"
	nlcom (autonom_content_task: 888888), post
	estimates store sign_autonom_content_task

	* Note: 999999 means "+"   888888 means "-"
	nlcom (autonom_order_task: 999999), post
	estimates store sign_autonom_order_task
	
	eststo coef_est: 	appendmodels est_v_flex_working_time	est_take_time_off_hour		est_autonom_order_task		est_time_pressure 		est_autonom_content_task	est_schicht_isco2		est_overtime_isco2		est_share_overtime_pay				
	eststo sign_est: 	appendmodels sign_v_flex_working_time 	sign_take_time_off_hour		sign_autonom_order_task		sign_time_pressure		sign_autonom_content_task	sign_schicht_isco2		sign_overtime_isco2		sign_share_overtime_pay				

	esttab coef_est sign_est, ///  
			varwidth(30) cells("b(star fmt(%9.3gc))" "se(par fmt(%6.2gc))") label nodepvar collabels(none)  star(* 0.1 ** 0.05 *** 0.01)  noobs ///
			coeflabels(parttime "Share of part-time job ads" v_flex_working_time "Share of workers with very flexible working hours" take_time_off_hour "Share of workers who can take hours off at short notice" ///
						overtime_isco2 "Share of workers working overtime" share_overtime_pay "Share of overtime pay" schicht_isco2 "Share of workers working shift" time_pressure "Share of workers reporting time pressure" ///
						autonom_order_task "Share with autonomy in determining order of tasks" autonom_content_task "Share with autonomy in determining content of tasks") ///
			mtitles("Coefficient (SE)" "Expected sign")			
	esttab coef_est sign_est using "$results_part_time\table_c2.tex", replace ///  
			varwidth(30) cells("b(star fmt(%9.3gc))" "se(par fmt(%6.2gc))") label nodepvar collabels(none)  star(* 0.1 ** 0.05 *** 0.01)  noobs frag ///
			coeflabels(parttime "Share of part-time job ads" v_flex_working_time "Share of workers with very flexible working hours" take_time_off_hour "Share of workers who can take hours off at short notice" ///
						overtime_isco2 "Share of workers working overtime" share_overtime_pay "Share of overtime pay in total wage bill" schicht_isco2 "Share of workers working shift" time_pressure "Share of workers reporting time pressure" ///
						autonom_order_task "Share with autonomy in determining order of tasks" autonom_content_task "Share with autonomy in determining content of tasks") ///
			mtitles("Coefficient (SE)" "Expected sign")		///
			substitute(999,999 + 888,888 - (.) "")
	
	
	